//
//  LLComposeTextView.m
//  Weibo
//
//  Created by 李灵斌 on 15-2-6.
//  Copyright (c) 2015年 apple. All rights reserved.
//

#import "LLComposeTextView.h"

@interface LLComposeTextView ()

@property (nonatomic, weak) UILabel *lab;

@end

@implementation LLComposeTextView

- (instancetype)initWithFrame:(CGRect)frame{
    
    if (self = [super initWithFrame:frame]) {
        [self setup];
    }
    return self;
}

- (id)initWithCoder:(NSCoder *)aDecoder{
    
    if (self = [super initWithCoder:aDecoder]) {
        [self setup];
    }
    return self;
}

- (void)setup{
    
    UILabel *lab = [[UILabel alloc] init];
    [self addSubview:lab];
    lab.textColor = [UIColor orangeColor];
    self.lab = lab;
    self.font = [UIFont systemFontOfSize:14];
    lab.font = [UIFont systemFontOfSize:14];
}

- (void)layoutSubviews{
    
    [super layoutSubviews];
    self.lab.x = 2;
    self.lab.y = 8;
    [self.lab sizeToFit];
    
}

- (void)setPlaceHolder:(NSString *)placeHolder{
    
    _placeHolder = placeHolder;
    self.lab.font = self.font;
    self.lab.text = placeHolder;
}

- (void)setFont:(UIFont *)font{
    [super setFont:font];
    self.lab.font = font;
}

@end
